<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  </head>
  <body>
    <div id="Application">
      <div>点击次数：{{ count }}</div>
      <button @click="click(4, $event), log($event)">点击</button>
      <button @click="this.count++">点击2</button>

      <div @click="click1" style="border: solid red;">
        外层
        <div @click="click2" style="border: solid red">
          中层
          <div @click="click3" style="border: solid red">
            内层
          </div>
        </div>
      </div>
    </div>

    <script>
      const { createApp, ref } = Vue;
      let config = {
        setup() {
          const count = ref(0);
          const click = (step, event) => {
            console.log(event)
            count.value += step;
          };
          const log = (event) => {
            console.log("log", event)
          }
          const click1 = (event) => {
            console.log("外层", event)
          }
          const click2 = (event) => {
            console.log("中层", event)
          }
          const click3 = (event) => {
            console.log("内层", event)
          }
          return { count, click, log, click1, click2, click3 };
        },
      };
      createApp(config).mount("#Application");
    </script>
  </body>
</html>
